<!DOCTYPE>
<html>
<meta name="csrf-token" content="{{ csrf_token() }}">
@include('common/head');
<!--single-->

</head>
<body>
<!--header-->
@include('common/navbar')
<!-- header end -->

<div class="page-container">
    <div class="page-content" id="mainContents">
        <div class="container-fluid">
            <div class="row-fluid clearfix">
                <!-- BEGIN STYLE CUSTOMIZER -->
                <div class="span12">
                    <h3 class="page-title"> &nbsp;  </h3>
                </div>
                <!-- END PAGE TITLE & BREADCRUMB-->
            </div>

            <div class="row-fluid">
                <div class="tabbable tabbable-custom tabbable-full-width">
                    @include('common/menu')
                    <div class="form-content">

                        <!---->
                        <div class="row-fluid margin-bottom-25">

                            <div class="span12">

                                <!-- BEGIN VALIDATION STATES-->
                                <div class="portlet box gdcdc">
                                    <div class="row-fluid clearfix detail-aller">
                                        <div class="span10">
                                            <div class="buess-tleft">
                                                <div class="btn-group">
                                                    <button id="sample_bussFanwei" class="btn btn-warning">
                                                        查看许可范围
                                                    </button>
                                                </div>
                                                <div class="btn-group">
                                                    <a href="javascript:;" id="sample_bussDown" class="btn btn-primary">
                                                        下载资料
                                                    </a>
                                                </div>
                                                <div class="btn-group">
                                                    <button id="sample_bussCancel" class="btn btn-danger">
                                                        变更
                                                    </button>
                                                </div>
                                                <div class="btn-group">
                                                    <button id="sample_bussHist" class="btn btn-warning">
                                                        历史记录
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="span2">
                                            <div class="buess-trgt text-right">
                                                <div class="btn-group">
                                                    <a href="javascript:;" id="sample_error_1" class="btn btn-jiucuo">
                                                        纠错
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row-fluid margin-bottom-20 margin-top-20">
                                        <div class="span12">
                                            <!-- BEGIN EXAMPLE TABLE PORTLET-->
                                            <div class="portlet box light-grey widper98">
                                                <div class="portlet-body">
                                                    <div class="ordertball table-responsive margin-bottom-20">
                                                        <table class="table table-bordered tablelist" id="dataTableDetail">
                                                            <thead class="tbhead">
                                                            <tr>
                                                                <th>
                                                                    <label class="frstrate">
                                                                        <input type="checkbox"class="checkson SelectAllImg" />
                                                                        <img src="{{URL::asset('/static/images/c_checkbox_off.png')}}"/>
                                                                    </label>
                                                                </th>
                                                                <th class="t1">
                                                                    <p>序号</p>
                                                                    <div class="controls lastrate">
                                                                        <input class="input-control putw2" type="hidden" readonly>
                                                                    </div>
                                                                </th>
                                                                <th class="t1">
                                                                    <p>资料编号</p>
                                                                    <div class="controls cust_id">
                                                                        <input class="input-control putw2" type="text" placeholder="请输入资料编号">
                                                                    </div>
                                                                </th>
                                                                <th class="t1">
                                                                    <p>客户名称</p>
                                                                    <div class="controls">
                                                                        <select class="input-control selwd2 c-custname" id="search_cust" name="custName">
                                                                            @foreach($licenseList as $k=>$v)
                                                                                <option>{{$v->cust_name}}</option>
                                                                            @endforeach
                                                                        </select>

                                                                    </div>
                                                                </th>

                                                                <th class="t1">
                                                                    <p>有效期至</p>
                                                                    <div class="controls time_screen">
                                                                        <input placeholder="开始时间" class="input-control putw3 c-begintime" type="text" name="beginTime" id="beginTime">
                                                                        -
                                                                        <input placeholder="结束时间" class="input-control putw3 c-endtime" type="text" name="endTime" id="endTime">
                                                                    </div>
                                                                </th>

                                                                <th class="t1">
                                                                    <p>资料图片</p>
                                                                    <div class="controls lastrate">
                                                                        <input class="input-control putw2" type="hidden" readonly>
                                                                    </div>
                                                                </th>
                                                            </tr>
                                                            </thead>
                                                            <tbody class="tbbody tbbody-user">
                                                            @foreach($licenseList as $k=>$v)
                                                                <tr>
                                                                    <td class="buss_td">
                                                                        <label>
                                                                            <input type="checkbox" data-id="{{$v->id}}" class="checkson checkbox_child"/>
                                                                            <img src="{{URL::asset('/static/images/c_checkbox_off.png')}}"/>
                                                                        </label>
                                                                    </td>
                                                                    <td class="buss_td">{{$k+1}}</td>
                                                                    <td class="buss_td">{{$v->cust_id}}</td>
                                                                    <td class="buss_td">{{$v->cust_name}}</td>

                                                                    <td class="buss_td">{{$v->dcs_validity==1?'永久':date('Y-m-d ',$v->dcs_validity)}}</td>
                                                                    <td class="buss_td">
                                                                        <p class="c-put orderedt" href="javascript:;">
                                                                            <img src="{{resizeImage('material/'.$v->dcs_card,'110','65',0 )}}">
                                                                        </p>
                                                                    </td>
                                                                </tr>
                                                            @endforeach

                                                            </tbody>
                                                        </table>
                                                    </div>

                                                    <!--page-->
                                                    <div class="row-fluid">
                                                        <div class="span6"><div class="dataTables_info" id="sample_editable_1_info">共{{$licenseList->count()}}条数据</div></div>
                                                        <div class="span6">
                                                            {{$licenseList->links()}}
                                                            <div class="clearfix"></div>

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <!-- END EXAMPLE TABLE PORTLET-->
                                        </div>
                                    </div>

                                </div>
                                <!-- END VALIDATION STATES-->
                            </div>
                        </div>
                        <!--end tab-pane-->
                    </div>
                </div>
                <!--end tabbable-->
            </div>

        </div>
    </div>
</div>

<!-- footer -->
<div class="footer">
    <div class="footer-inner"> Copyright &copy; 资质审核管理   沪ICP备16047540号-1</div>
    <div class="footer-tools"> <span class="go-top"> <i class="icon-angle-up"></i> </span> </div>
</div>
{{--变更弹窗--}}
<div class="modelpact j-buessChangeTan hide">
    <div class="row-fluid margin-bottom-25">
        <div class="span12">
            <!-- BEGIN VALIDATION STATES-->
            <div class="portlet box gdcdc">
                <div class="portlet-body form">
                    <!-- BEGIN FORM-->
                    <form action="#" id="form_pactchose" class="form-horizontal padding-top-20">
                        <div class="control-group">
                            <label class="control-label">客户名称</label>
                            <div class="controls">
                                <select class="input-control span7 c-cusname" name="custName">
                                    @foreach($licenseList as $k=>$v)
                                        <option>{{$v->cust_name}}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">上传新资料</label>
                            <div class="uploader controls" id="j-uploader">
                                <input type="text" class="span5 oneupfile filename j-buessuper license_license" name="oneupfile" id="dcs_card" readonly/>
                                <input type="button" name="file" class="button"  value="上传..."/>
                                <input type="file" name="legal_card" id="ImportPicInput" size="30" />
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label">有效期至</label>
                            <div class="controls">
                                <input class="input-control span7 c-daima s_beginTime" name="custName" id="s_beginTime" />
                            </div>
                        </div>
                    </form>
                    <!--<div class="publay_butom">
                        <a class="laysure-btn0">确定</a>
                        <a class="laycols-btn1">取消</a>
                    </div>	-->
                    <!-- END FORM-->
                </div>
            </div>
            <!-- END VALIDATION STATES-->
        </div>
    </div>
</div>
{{--弹窗--}}
<div class="modelpact j-buessChangeJiu hide">
    <div class="row-fluid margin-bottom-25">
        <div class="span12">
            <!-- BEGIN VALIDATION STATES-->
            <div class="portlet box gdcdc">
                <div class="portlet-body form">
                    <!-- BEGIN FORM-->
                    <form action="#" id="form_pactchose" class="form-horizontal padding-top-20">
                        <div class="control-group">
                            <label class="control-label">客户名称</label>
                            <div class="controls">
                                <select class="input-control span7 c-cusnames" name="custName">
                                    @foreach($licenseList as $k=>$v)
                                        <option>{{$v->cust_name}}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">上传新资料</label>
                            <div class="uploader controls" id="j-uploader">
                                <input type="text" class="span5 oneupfile filename j-buessuper license_licenses" name="oneupfile" id="" readonly/>
                                <input type="button" name="file" class="button" value="上传..."/>

                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label">有效期至</label>
                            <div class="controls">
                                <input class="input-control span7 c-daima s_beginTimes" name="custName"  />
                            </div>
                        </div>
                    </form>
                    <!--<div class="publay_butom">
                        <a class="laysure-btn0">确定</a>
                        <a class="laycols-btn1">取消</a>
                    </div>	-->
                    <!-- END FORM-->
                </div>
            </div>
            <!-- END VALIDATION STATES-->
        </div>
    </div>
</div>
{{--经营范围--}}
<div class="modelhist j-bussHistFanwei hide">
    <div class="portlet-body">
        <div class="orderhist margin-bottom-20">
            <table class="table table-bordered tablelist" id="dataTableDetail">
                <thead class="tbhead">
                <tr>
                    <th class="t1">
                        <p>序号</p>
                    </th>
                    <th class="t1">
                        <p>商品名称</p>
                    </th>
                </tr>
                </thead>
                <tbody class="tbbody">
                @foreach($historyAll as $k=>$v)
                    <tr>
                        <td>{{$k}}</td>
                        <td>{{$v->username}}</td>

                    </tr>
                @endforeach

                </tbody>
            </table>
        </div>
        <div class="row-fluid">
            <div class="span6"><div class="dataTables_info" id="sample_editable_1_info">共{{$historyAll->count()}}条数据</div></div>

        </div>
    </div>
</div>

<!--历史记录弹窗-->sample_bussFanwei
<div class="modelhist j-bussHistModel hide">
    <div class="portlet-body">
        <div class="orderhist margin-bottom-20">
            <table class="table table-bordered tablelist" id="dataTableDetail">
                <thead class="tbhead">
                <tr>
                    <th class="t1">
                        <p>操作时间</p>
                    </th>
                    <th class="t1">
                        <p>操作人</p>
                    </th>
                    <th class="t1">
                        <p>描述</p>
                    </th>
                    <th class="t1">
                        <p>备注</p>
                    </th>
                </tr>
                </thead>
                <tbody class="tbbody">
                @foreach($historyAll as $k=>$v)
                    <tr>
                        <td>{{$v->created_time}}</td>
                        <td>{{$v->username}}</td>
                        <td>{{$v->description}}</td>
                        <td>{{$v->tag}}</td>
                    </tr>
                @endforeach

                </tbody>
            </table>
        </div>
        <div class="row-fluid">
            <div class="span6"><div class="dataTables_info" id="sample_editable_1_info">共{{$historyAll->count()}}条数据</div></div>

        </div>
    </div>
</div>
<script src="{{URL::asset('static/js/bootstrap/fileinput.min.js')}}"></script>
<link rel="stylesheet" href="{{URL::asset('static/style/bootstrap/fileinput.min.css')}}">
<script type="text/javascript" src="{{URL::asset('/static/js/public/app.js')}}"></script>
<script type="text/javascript" src="{{URL::asset('/static/js/lib/a_dangerous_busslicence.js')}}"></script>
<script src="{{URL::asset('/static/js/bootstrap/bootstrap-datepicker.min.js')}}"></script>
<script src="{{URL::asset('/static/js/bootstrap/bootstrap-datepicker.zh-CN.min.js')}}"></script>
<link rel="stylesheet" href="{{URL::asset('/static/style/bootstrap/bootstrap-datepicker3.standalone.min.css')}}">
<link href="{{URL::asset('/static/style/lib/yy_buesslicence.css')}}" rel="stylesheet" type="text/css" />

<script>
    function dataTimeRange(start,end){//日期范围
        $('#'+start).datetimepicker({
            minView: 2,
            todayBtn : "linked",
            autoclose : true,
            todayHighlight : true,
            endDate : new Date(),
            format:'yyyy-mm-dd ',
            language:'zh-CN'
        }).on('changeDate',function(e){
            var startTime = e.date;
            $('#'+end).datetimepicker('setStartDate',startTime);
        });

        //结束时间
        $('#'+end).datetimepicker({
            minView: 2,
            todayBtn : "linked",
            autoclose : true,
            todayHighlight : true,
            format:'yyyy-mm-dd',
            language:'zh-CN'
        }).on('changeDate',function(e){
            var endTime = e.date;
            $('#'+start).datetimepicker('setEndDate',endTime);
        });
    }
    dataTimeRange("beginTime","endTime")

    jQuery(document).ready(function() {
        // initiate layout and plugins
        App.init();
    });
</script>


</body>

</html>